// Copyright DustedPixels.com 2008. All rights reserved.

package units;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class And {
  public interface Context {
    int getInput1();
    int getInput2();
    void setOutput(int value);
  }  
  
  private final Context context;
  
  public And(Context context) {
    this.context = context;
  }
  
  public void update() {
    context.setOutput(context.getInput1() & context.getInput2());
  }
}